import request from '@/utils/request'

//角色列表
export const RoleList = (): Promise<ServiceResponse<Role[]>> => request({ url: 'role/list' ,method:'post'})
//获取角色菜单
export const RoleDetails = (data: { id: number }): Promise<ServiceResponse<RoleDetails>> => request({ url: 'role/details', data, loading: true })
//保存角色
export const RoleSave = (data: RoleEditor): Promise<ServiceResponse<any>> => request({ url: 'role/save', data, loading: true, method: 'POST' })
//删除角色
export const RoleDelete = (data: { id: number }): Promise<ServiceResponse<any>> => request({ url: 'role/delete', data, loading: true })  
